package cm.java.jpa.inicial;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.IdClass;

@Entity
@IdClass(NoticiaId.class)
public class Noticia {
    
    @EmbeddedId
    private NoticiaId id;
    private String content;

    public Noticia(NoticiaId id, String content) {
        this.id = id;
        this.content = content;
    }

    public NoticiaId getId() {
        return id;
    }

    public String getContent() {
        return content;
    }

    public void setId(NoticiaId id) {
        this.id = id;
    }

    public void setContent(String content) {
        this.content = content;
    }
    
}
